<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="include :: header"></head>
<body>
<div style="padding: 15px">
    <blockquote class="layui-elem-quote layui-text">
        <span style="color:red">注意：</span>收入为实际收入减去各种贷款后的剩余可支配金额
    </blockquote>
    <form class="layui-form" action="">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">来源名称</label>
                <div class="layui-input-inline">
                    <select name="source" id="source" lay-verify="required" lay-search="">
                        <option value="01">餐饮</option>
                        <option value="02">购物</option>
                        <option value="03">交通</option>
                        <option value="04">娱乐</option>
                        <option value="05">通讯</option>
                        <option value="10">可支配</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">财务类别</label>
                <div class="layui-input-inline">
                    <select name="type" id="type" lay-verify="required" lay-search="">
                        <option value="01">支出</option>
                        <option value="10">可支配</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">财务账户</label>
                <div class="layui-input-inline">
                    <input type="text" name="account" lay-verify="required" autocomplete="off" value="fanling"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">金额（元）</label>
                <div class="layui-input-inline">
                    <input type="number" name="money" lay-verify="required" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">核算日期</label>
                <div class="layui-input-inline">
                    <input type="text" name="recordDate" id="recordDate" lay-verify="date" placeholder="yyyy-MM-dd"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                   <textarea type="text" name="remark" autocomplete="off"
                             class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="balance">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    /*<![CDATA[*/
    var sysUrl = '/venus/project/balance';
    layui.use(['form', 'laydate'], function () {
        var form = layui.form, laydate = layui.laydate;
        laydate.render({
            elem: '#recordDate'
        });
        form.on('submit(balance)', function (data) {
            save(sysUrl, 'add', data.field);
            return false;
        });
    });
    /*]]>*/
</script>
</body>
</html>